package Play;
import Book.book;
import Book.booklist;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dell
 * Date: 2023-11-29
 * Time: 18:18
 */
public class findbook implements Feature{
    @Override
    public void work(booklist Book) {
        //      System.out.println("findbook");
        Scanner scanner =new Scanner(System.in);
        System.out.println("请输入书名");
        String name =scanner.nextLine();
        int count= Book.getBooksize();
        for (int i =0;i<count;i++){
            book Books=Book.getBook(i);
            if(Books.getName().equals(name)){
                System.out.println("找到了");
                System.out.println(Books);
                return;
            }
        }
        System.out.println("没找到");
    }
}